function [CNC_state,ask_list,CNC_swork]=queuelist(CNC_state,ask_list,CNC_swork,CNC_work,number)
ask_list=[];
%CNC_swork=[1,1,1,1,1,0,1,0];
inner_a_list=[1,2,3,4];
    for i=1:length(inner_a_list)
        if CNC_swork(inner_a_list(i))
            if (CNC_state(inner_a_list(i))-CNC_work(1))>= 0
               ask_list=[ask_list,inner_a_list(i)];
            end
        else
            CNC_state(inner_a_list(i))=0;
            ask_list=[ask_list,inner_a_list(i)];
        end
    end
end